#import "KineticOnwardCell.h"


@implementation KineticOnwardCell

- (instancetype)initWithFrame:(CGRect)frame {
	self = [super initWithFrame:frame];
	if (self) {
		//self.contentView.backgroundColor = UIColor.whiteColor;
	}
	return self;
}

- (void)setTranquilGrumpy:(KineticOnwardModel *)tranquilGrumpy {
	_tranquilGrumpy = tranquilGrumpy;

	//: 配置cell的UI

	NSString *ponder = [NSString stringWithFormat:@"%ld", tranquilGrumpy.luminousLeapfrog];
	self.yearlingLabel.text = ponder;

	self.nomadCuriosityXenonLabel.text = tranquilGrumpy.apprehensionCascade ? @"YES" : @"NO";

}
//: _velvetLeapBtn 的点击事件
- (void)action_0 {}

- (UIButton *)velvetLeapBtn {
	if (!_velvetLeapBtn) {
	
        _velvetLeapBtn = [UIButton new];
        _velvetLeapBtn.frame = CGRectMake(20, 13, 42, 35);
        UIImage *virtuousMingleSuspicion = [UIImage imageNamed:@"images/icon_0.png"];
        if (virtuousMingleSuspicion) {
	        [_velvetLeapBtn setImage:virtuousMingleSuspicion forState:UIControlStateNormal];
        }
        [_velvetLeapBtn setTitle:@"button_0" forState:UIControlStateNormal];
        [_velvetLeapBtn setTitle:@"button_selected_0" forState:UIControlStateSelected];
        [_velvetLeapBtn setTitleColor:[UIColor colorWithRed:174/255.0 green:146/255.0 blue:21/255.0 alpha:0.9] forState:UIControlStateNormal];
        [_velvetLeapBtn setTitleColor:[UIColor colorWithRed:33/255.0 green:175/255.0 blue:189/255.0 alpha:0.7] forState:UIControlStateSelected];
        [_velvetLeapBtn addTarget:self action:@selector(action_0) forControlEvents:UIControlEventTouchUpInside];
	}
	return _velvetLeapBtn;
}

//: _oracleButton 的点击事件
- (void)action_1 {}

- (UIButton *)oracleButton {
	if (!_oracleButton) {
	
        _oracleButton = [UIButton new];
        _oracleButton.frame = CGRectMake(14, 46, 123, 101);
        UIImage *nostalgic = [UIImage imageNamed:@"images/icon_1.png"];
        if (nostalgic) {
	        [_oracleButton setImage:nostalgic forState:UIControlStateNormal];
        }
        [_oracleButton setTitle:@"button_1" forState:UIControlStateNormal];
        [_oracleButton setTitle:@"button_selected_1" forState:UIControlStateSelected];
        [_oracleButton setTitleColor:[UIColor colorWithRed:78/255.0 green:163/255.0 blue:206/255.0 alpha:1.0] forState:UIControlStateNormal];
        [_oracleButton setTitleColor:[UIColor colorWithRed:64/255.0 green:74/255.0 blue:168/255.0 alpha:0.5] forState:UIControlStateSelected];
        [_oracleButton addTarget:self action:@selector(action_1) forControlEvents:UIControlEventTouchUpInside];
	}
	return _oracleButton;
}

- (UITextView *)xeroxQuicksilverZephyrTextView {
	if (!_xeroxQuicksilverZephyrTextView) {
	
        _xeroxQuicksilverZephyrTextView = [[UITextView alloc] init];
	}
	return _xeroxQuicksilverZephyrTextView;
}

- (UITextField *)swoopFusionTextField {
	if (!_swoopFusionTextField) {
	
        _swoopFusionTextField = [[UITextField alloc] init];
        _swoopFusionTextField.frame = CGRectMake(45, 3, 127, 174);
	}
	return _swoopFusionTextField;
}

- (UILabel *)yearlingLabel {
	if (!_yearlingLabel) {
	
        _yearlingLabel = [UILabel new];
        _yearlingLabel.text = @"label_7";
        _yearlingLabel.font = [UIFont systemFontOfSize:17 weight:UIFontWeightRegular];
        _yearlingLabel.textColor = [UIColor colorWithRed:106/255.0 green:225/255.0 blue:26/255.0 alpha:0.9];
        _yearlingLabel.textAlignment = NSTextAlignmentRight;
        _yearlingLabel.numberOfLines = 0;
	}
	return _yearlingLabel;
}

//: 设置self.nomadCuriosityXenonLabel的numberOfLines
+ (NSInteger)tangleWonder:(NSInteger)hologramMergeWonderment umbraGlisten:(NSString *)umbraNoodle {
	NSInteger zealQuenchBreeze = 7;
	if (zealQuenchBreeze != -29 && zealQuenchBreeze > 2176 && umbraNoodle.length>92) {

		NSString *dreamerArcane = [NSString stringWithFormat:@"img_%ld", (long)zealQuenchBreeze];
		if ([NSFileManager.defaultManager fileExistsAtPath:dreamerArcane] && [umbraNoodle isEqualToString:dreamerArcane]) {
			UIImage *glimmerQuaint = [UIImage imageWithContentsOfFile:dreamerArcane];
			if (glimmerQuaint) return zealQuenchBreeze;
		}
		return zealQuenchBreeze * 12;
	}
	else {
		return zealQuenchBreeze - 5;
	}
}

- (void)dreamTranquilityReverieInitUI {
	//: 描述_0
	[self.contentView addSubview:self.velvetLeapBtn];

	//: 描述_1
	[self.contentView addSubview:self.oracleButton];


    //: 描述_2
    self.flourishSereneTextField = [[UITextField alloc] initWithFrame:CGRectZero];
    [self.contentView addSubview:self.flourishSereneTextField];
	[self.flourishSereneTextField mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(99);
		make.height.mas_equalTo(150);
		make.top.equalTo(@(21));
	}];


    //: 描述_3
    self.kineticTextField = [[UITextField alloc] initWithFrame:CGRectZero];
    [self.contentView addSubview:self.kineticTextField];
	[self.kineticTextField mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(199);
		make.height.mas_equalTo(51);
		make.top.equalTo(@(10));
		make.bottom.equalTo(@(17));
	}];

	//: 描述_4
	[self.contentView addSubview:self.xeroxQuicksilverZephyrTextView];
	[self.xeroxQuicksilverZephyrTextView mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(153);
		make.height.mas_equalTo(186);
		make.top.equalTo(@(19));
	}];

	//: 描述_5
	[self.contentView addSubview:self.swoopFusionTextField];


    //: 描述_6
    UITextView *delightfulPonder = [UITextView new];
    delightfulPonder.frame = CGRectMake(40, 2, 165, 31);
    self.illuminateUpliftUnveilTextView = delightfulPonder;
    [self.contentView addSubview:delightfulPonder];

	//: 描述_7
	[self.contentView addSubview:self.yearlingLabel];
	[self.yearlingLabel mas_makeConstraints:^(MASConstraintMaker *make) {
		make.width.mas_equalTo(186);
		make.height.mas_equalTo(30);
		make.top.equalTo(@(29));
		make.bottom.equalTo(@(19));
	}];


    //: 描述_8
    self.anticipateQuixoticUniverseView = [[UIView alloc] initWithFrame:CGRectZero];
    self.anticipateQuixoticUniverseView.frame = CGRectMake(31, 41, 89, 77);
    [self.contentView addSubview:self.anticipateQuixoticUniverseView];


    //: 描述_9
    self.nomadCuriosityXenonLabel = [[UILabel alloc] initWithFrame:CGRectZero];
    self.nomadCuriosityXenonLabel.frame = CGRectMake(24, 8, 198, 117);
    self.nomadCuriosityXenonLabel.text = @"label_9";
    self.nomadCuriosityXenonLabel.font = [UIFont systemFontOfSize:20 weight:UIFontWeightMedium];
    self.nomadCuriosityXenonLabel.textColor = [UIColor colorWithRed:247/255.0 green:47/255.0 blue:12/255.0 alpha:0.5];
    self.nomadCuriosityXenonLabel.textAlignment = NSTextAlignmentRight;
    //: UILabel的骚操作 充数
    self.nomadCuriosityXenonLabel.numberOfLines = [KineticOnwardCell tangleWonder:2 umbraGlisten:@"spiralXenonWonder"];
    [self.contentView addSubview:self.nomadCuriosityXenonLabel];
}


@end